import request from '@/utils/request'

// 策略列表
export function getStrategy(params) {
  return request({
    url: '/vm-service/policy/search',
    method: 'get',
    params
  })
}

// 新增策略
export function addStrategy(data) {
  return request({
    url: '/vm-service/policy',
    method: 'post',
    data
  })
}
// 修改策略
export function updateStrategy(id, data) {
  return request({
    url: '/vm-service/policy/' + id,
    method: 'put',
    data
  })
}

// 删除策略
export function deleteStrategy(id) {
  return request({
    url: '/vm-service/policy/' + id,
    method: 'delete'
  })
}
// 策略详情
export function detailStrategy(id, params) {
  return request({
    url: 'vm-service/policy/vmList/' + id,
    method: 'get',
    params
  })
}
